package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * Created by VegetaKo on 2016/11/6.
 */
@DynamicInsert
@Entity
@Table(name = "salesman_income_detail",catalog = "")
public class SalesmanIncomeDetail  extends BaseEntity {
    private String awardNo;
    private String awardType;
    private String salesmanNo;
    private String salesmanName;
    private String fansOpenId;
    private String l2RNo;
    private String memberNo;
    private BigDecimal nights;
    private String resSta;
    private String awardSta;
    private BigDecimal unit;
    private BigDecimal multiple;
    private BigDecimal total;
    private String l2RPayNo;

    public enum SalesmanIncomeDetail_{
        awardNo,awardType,salesmanNo,salesmanName,fansOpenId,l2RNo,memberNo,nights,resSta,awardSta,unit,multiple,total,l2RPayNo,lhotelCode
    }

    @Basic
    @Column(name = "award_no", nullable = false, length = 16)
    public String getAwardNo() {
        return awardNo;
    }

    public void setAwardNo(String awardNo) {
        this.awardNo = awardNo;
    }

    @Basic
    @Column(name = "award_type", nullable = false, length = 16)
    public String getAwardType() {
        return awardType;
    }

    public void setAwardType(String awardType) {
        this.awardType = awardType;
    }

    @Basic
    @Column(name = "salesman_no", nullable = false, length = 64)
    public String getSalesmanNo() {
        return salesmanNo;
    }

    public void setSalesmanNo(String salesmanNo) {
        this.salesmanNo = salesmanNo;
    }

    @Basic
    @Column(name = "salesman_name", nullable = true, length = 32)
    public String getSalesmanName() {
        return salesmanName;
    }

    public void setSalesmanName(String salesmanName) {
        this.salesmanName = salesmanName;
    }

    @Basic
    @Column(name = "fans_open_id", nullable = true, length = 64)
    public String getFansOpenId() {
        return fansOpenId;
    }

    public void setFansOpenId(String fansOpenId) {
        this.fansOpenId = fansOpenId;
    }

    @Basic
    @Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "member_no", nullable = true, length = 64)
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "nights", nullable = true, precision = 2)
    public BigDecimal getNights() {
        return nights;
    }

    public void setNights(BigDecimal nights) {
        this.nights = nights;
    }

    @Basic
    @Column(name = "res_sta", nullable = true, length = 16)
    public String getResSta() {
        return resSta;
    }

    public void setResSta(String resSta) {
        this.resSta = resSta;
    }

    @Basic
    @Column(name = "award_sta", nullable = true, length = 16)
    public String getAwardSta() {
        return awardSta;
    }

    public void setAwardSta(String awardSta) {
        this.awardSta = awardSta;
    }

    @Basic
    @Column(name = "unit", nullable = true, precision = 2)
    public BigDecimal getUnit() {
        return unit;
    }

    public void setUnit(BigDecimal unit) {
        this.unit = unit;
    }

    @Basic
    @Column(name = "multiple", nullable = true, precision = 2)
    public BigDecimal getMultiple() {
        return multiple;
    }

    public void setMultiple(BigDecimal multiple) {
        this.multiple = multiple;
    }

    @Basic
    @Column(name = "total", nullable = true, precision = 2)
    public BigDecimal getTotal() {
        return total;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    @Basic
    @Column(name = "l2r_pay_no", nullable = true, length = 16)
    public String getL2RPayNo() {
        return l2RPayNo;
    }

    public void setL2RPayNo(String l2RPayNo) {
        this.l2RPayNo = l2RPayNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SalesmanIncomeDetail that = (SalesmanIncomeDetail) o;

        if (awardNo != null ? !awardNo.equals(that.awardNo) : that.awardNo != null) return false;
        if (awardType != null ? !awardType.equals(that.awardType) : that.awardType != null) return false;
        if (salesmanNo != null ? !salesmanNo.equals(that.salesmanNo) : that.salesmanNo != null) return false;
        if (salesmanName != null ? !salesmanName.equals(that.salesmanName) : that.salesmanName != null) return false;
        if (fansOpenId != null ? !fansOpenId.equals(that.fansOpenId) : that.fansOpenId != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (nights != null ? !nights.equals(that.nights) : that.nights != null) return false;
        if (resSta != null ? !resSta.equals(that.resSta) : that.resSta != null) return false;
        if (awardSta != null ? !awardSta.equals(that.awardSta) : that.awardSta != null) return false;
        if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false;
        if (multiple != null ? !multiple.equals(that.multiple) : that.multiple != null) return false;
        if (total != null ? !total.equals(that.total) : that.total != null) return false;
        if (l2RPayNo != null ? !l2RPayNo.equals(that.l2RPayNo) : that.l2RPayNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = awardNo != null ? awardNo.hashCode() : 0;
        result = 31 * result + (awardType != null ? awardType.hashCode() : 0);
        result = 31 * result + (salesmanNo != null ? salesmanNo.hashCode() : 0);
        result = 31 * result + (salesmanName != null ? salesmanName.hashCode() : 0);
        result = 31 * result + (fansOpenId != null ? fansOpenId.hashCode() : 0);
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (memberNo != null ? memberNo.hashCode() : 0);
        result = 31 * result + (nights != null ? nights.hashCode() : 0);
        result = 31 * result + (resSta != null ? resSta.hashCode() : 0);
        result = 31 * result + (awardSta != null ? awardSta.hashCode() : 0);
        result = 31 * result + (unit != null ? unit.hashCode() : 0);
        result = 31 * result + (multiple != null ? multiple.hashCode() : 0);
        result = 31 * result + (total != null ? total.hashCode() : 0);
        result = 31 * result + (l2RPayNo != null ? l2RPayNo.hashCode() : 0);
        return result;
    }
}
